<?php
namespace app\common\model;
class Source extends Base{
    function media(){
    	return $this->hasMany('media');
    }
    function getSources($where=[]){
    	$options=[
    		'with'=>'media',
    	];
    	return $this->readAll($where,true,$options)->toJson();
    }
}
